import color from '../../framework/utils/color';

export default function(name, url) {
  // console.log(name + " + " + url);
  if (url && url != "") {
    return <img src={url} />;
  }
  if (name === null || name === undefined || name === "") {
    name = "兼职";
  }
  return <div style={{backgroundColor: color.random(),
    color: '#fff',
    fontSize: '0.28rem',
    textAlign: 'center',
    width: '3.3em',
    height: '3.3em',
    lineHeight: '3.3em',
    // marginLeft: '0.1rem',
    borderRadius: '50%'}}>{name.substr(0, 2)}</div>
}
